package com.jams.goodox.net.services;

import com.jams.goodox.constant.UrlConstants;
import com.jams.goodox.entity.ComplaintPraiseResp;
import com.jams.goodox.entity.ExpressBean;
import com.jams.goodox.entity.MeetSureOrderBean;
import com.jams.goodox.entity.PaymentBean;
import com.jams.goodox.entity.RepairFocusBean;
import com.jams.goodox.entity.RepairListBean;
import com.jams.goodox.entity.RepairStandBean;
import com.jams.goodox.entity.SellerBillResp;
import com.jams.goodox.entity.ServicePauseTime;
import com.jams.goodox.entity.ServicePeriod;
import com.jams.goodox.entity.StringBean;
import com.jams.goodox.entity.TenementMonthBean;
import com.jams.goodox.entity.TenementPayOrderBean;
import com.jams.goodox.entity.TenementProductBean;
import com.jams.goodox.entity.VisitorEwmBean;
import com.jams.goodox.entity.VisitorHistoryBean;
import com.jams.goodox.entity.WXEntity;
import com.jams.goodox.entity.resp.AddOrderResp;
import com.jams.goodox.entity.resp.MeetCalendarResp;
import com.jams.goodox.entity.resp.MeetHistoryResp;
import com.jams.goodox.entity.resp.MeetPointResp;
import com.jams.goodox.entity.resp.MeetRoomListResp;
import com.jams.goodox.entity.resp.MeetSessionResp;
import com.jams.goodox.entity.resp.MeetTypeResp;
import com.jams.goodox.entity.resp.ParkHistoryResp;
import com.jams.goodox.entity.resp.ParkOrderDetailResp;
import com.jams.goodox.entity.resp.ParkPlaceOrderResp;
import com.jams.goodox.entity.resp.ParkingResp;
import com.jams.goodox.entity.resp.ReservationPlaceResp;
import com.jams.goodox.net.BaseEntity;

import java.util.List;
import java.util.Map;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 *
 * Created by jams_zhen on 2016/9/22.
 */

public interface ServiceService {

    // 获取服务时间
    @GET(UrlConstants.getServicePeriod)
    Call<ServicePeriod> getServicePeriod(@Path("subId") String subId);

    // 获取维修列表
    @GET(UrlConstants.getRepairList)
    Call<RepairListBean> getRepairList(@Path("id") String id);

    // 获取物业缴费年列表
    @GET(UrlConstants.getPaymentInfo)
    Call<PaymentBean> getPaymentInfo(@Query("enterpriseId") String enterpriseId);

    //根据年列表获取月份列表
    @GET(UrlConstants.getPayMonthInfo)
    Call<TenementMonthBean> getPayMonthInfo(@QueryMap Map<String, String> names);

    //获取服务暂停时间
    @GET(UrlConstants.getServiceStopTime)
    Call<ServicePauseTime> getServiceStopTime(@Path("subId") String subId);

    @GET(UrlConstants.queryPraiseUser)
    Call<ComplaintPraiseResp> queryPraiseUser(@Path("communityId") String communityId);

    @GET(UrlConstants.queryExpressCompany)
    Call<ExpressBean> queryExpressCompany(@Path("subId") String subId);

    @FormUrlEncoded
    @POST(UrlConstants.createVisitorEwm)
    Call<VisitorEwmBean> createVisitorEwm(@FieldMap Map<String, String> names);

    @GET(UrlConstants.visitorHistoryList)
    Call<VisitorHistoryBean> queryExpressHistory(@QueryMap Map<String, String> names);

    //获取维修标准
    @GET(UrlConstants.getRepairStand)
    Call<RepairStandBean> getRepairStand(@Path("id") String id);

    @Multipart
    @POST(UrlConstants.submitOrder)
    Call<BaseEntity> submitOrder(@Part("orderStr") RequestBody orderStr, @Part List<MultipartBody.Part> partList);

    /**
     * 提交缴费信息
     */
    @FormUrlEncoded
    @POST(UrlConstants.commitTenementOrder)
    Call<TenementPayOrderBean> commitTenementOrder(@FieldMap Map<String, String> names);

    /**
     * 提交发票
     */
    @FormUrlEncoded
    @POST(UrlConstants.commitBill)
    Call<StringBean> commitBill(@FieldMap Map<String, Object> names);

    //获取物业缴费类型
    @GET("UrlConstants.getTenementType")
    Call<TenementProductBean> getTenementType(@QueryMap Map<String, String> names);

    @GET(UrlConstants.getFocus)
    Call<RepairFocusBean> getFocus(@Path("id") String id);

    // 获取微信预支付id
    @GET(UrlConstants.getWxPayId)
    Call<WXEntity> getWxPayId(@Query("orderId") String orderId);

    // 获取服务微信预支付id
    @GET(UrlConstants.getServiceWxPayId)
    Call<WXEntity> getServiceWxPayId(@Query("orderId") String orderId, @Query("type") String type);


    /**  场地预定模块 **/
    //获取预定类型
    @GET(UrlConstants.getPlaceTypeList)
    Call<MeetTypeResp> getPlaceTypeList();

    //获取预定列表
    @GET(UrlConstants.getPlaceList)
    Call<MeetRoomListResp> getPlaceList(@QueryMap  Map<String, String> names);

    //获取场次列表
    @GET(UrlConstants.getDatePlaceList)
    Call<MeetSessionResp> getDatePlaceList(@Path("placeId") String placeId, @Query("placeDate") String placeDate);

    //获取日历
    @GET(UrlConstants.getMeetCalendar)
    Call<MeetCalendarResp> getMeetCalendar(@Path("placeId") String placeId);

    //下一步获取订单信息
    @FormUrlEncoded
    @POST(UrlConstants.getPlaceOrder)
    Call<MeetSureOrderBean> getPlaceOrder(@FieldMap  Map<String, String> names);

    //立即下单
    @FormUrlEncoded
    @POST(UrlConstants.addMeetOrder)
    Call<AddOrderResp> addMeetOrder(@Field("orderInfo") String orderInfo);

    //预定记录-可使用(分页)
    @GET(UrlConstants.getMeetHistory)
    Call<MeetHistoryResp> getMeetHistory(@QueryMap Map<String,String> params);

    //根据商家获取开票信息
    @GET(UrlConstants.getSellerBillMsg)
    Call<SellerBillResp> getSellerBillMsg(@Path("busId") String busId);

    //根据***和身份 获取开放车位信息、续约
    @GET(UrlConstants.getcarPlaceList)
    Call<ParkingResp> getcarPlaceList(@QueryMap Map<String,Object> params);

    //停车申请，选好了，下一步
    @FormUrlEncoded
    @POST(UrlConstants.carPlaceOrder)
    Call<ParkPlaceOrderResp> carPlaceOrder(@FieldMap Map<String,String> params);

    //获取申请记录
    @GET(UrlConstants.parkOrderDetail)
    Call<ParkOrderDetailResp> getParkOrderDetail(@Query("orderId") String orderId);

    //获取停车申请详情页
    @GET(UrlConstants.getParkList)
    Call<ParkHistoryResp> getParkList(@QueryMap Map<String,String> params);

    //取消停车申请订单
    @FormUrlEncoded
    @POST(UrlConstants.cancelParkOrder)
    Call<BaseEntity> cancelParkOrder(@Field("orderId") String orderId);

    //停车申请立即下单
    @FormUrlEncoded
    @POST(UrlConstants.addOrder)
    Call<AddOrderResp> addOrder(@Field("orderInfo") String orderInfo);

    //获取场地预约记录详情页
    @GET(UrlConstants.getReservationDetail)
    Call<ReservationPlaceResp> getReservationDetail(@Query("orderId") String orderId);

    //取消场地订单
    @GET(UrlConstants.cancelMeetOrder)
    Call<BaseEntity> cancelMeetOrder(@Query("orderId") String orderId);

    //预定记录是否有可用场次
    @GET(UrlConstants.getOrderCanUse)
    Call<MeetPointResp> getOrderCanUse(@Query("adminId") String adminId);
}
